Why are prefab customizations being applied to only a single character? [on hold]

Posted by m0rgul on Game Development See other posts from Game Development or by m0rgul
Published on 2014-08-21T11:04:45Z Indexed on 2014/08/22 16:38 UTC
Read the original article Hit count: 198

Filed under:
|
|
|

I've built my (networked) game to the point where I have a room, some characters and a character customization screen.

In the character customization screen I get to chose gender, chose from three different wardrobe options and assign custom colors to these wardrobe items. Then I use a custom object to store these options, serialize them and store them in PlayerPrefs, then load the next scene and apply them to my chosen character in this scene.

Then I go and spawn some more characters, customize them, etc. The problem is that my character is always customized, but all other characters in the scene are default copies of the prefab.

The prefabs themselves are a generic male and a generic female, both with three different wardrobes to chose from (they are included in the prefab).

When I spawn my character, I go to the saved options in PlayerPrefs, destroy the two discarded wardrobes, apply color to my chosen wardrobe and then spawn the character.

How would it be possible to make the other characters also show up in their customized form rather than just the generic prefab (which shows all three wardrobes at the same time)?

© Game Development or respective owner

Related posts about unity

Related posts about multiplayer